home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 6140 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.1 KB

  1. Path: news1.interserv.net!news
  2. From: <dvisage@interserv.com>
  3. Newsgroups: comp.lang.c++
  4. Subject: typedef and complex types
  5. Date: 11 Feb 1996 22:09:48 GMT
  6. Organization: InterServ News Service
  7. Message-ID: <4flpfc$101@lal.interserv.net>
  8. NNTP-Posting-Host: dd06-002.compuserve.com
  9. Content-Type: text/plain
  10. Content-length: 835
  11. X-Newsreader: AIR Mosaic (32-bit) 4.00
  12.  
  13.  
  14. >   static void call_thru (int argc, char *argv[]);
  15. >
  16. >   PFV netx_entry_point = call_thru;
  17. >
  18. >(Note: they are not all just (int, char**)).
  19. >
  20. >I have gone through most of the code and removed the declarations
  21. >involving PFV and replaced with something like:
  22. >
  23. >   void (*netx_entry_point(int, char**) = call_thru;
  24. >
  25. >I would like to know if there is a more elegant or perhaps just plain
  26. >better way to handle this that is not obvious to me.
  27. >
  28. >Thanks,
  29. >
  30. If they are not all just (int, char**), then perhaps more than one typedef
  31. is called for.  For the ones that are really PFV types, you can change the
  32. typedef to look like this :
  33.  
  34. typedef void (*PFV)(int, char**);
  35.  
  36. and then most of your  assigments will work.  For those that do not have
  37. this type of parameter list, break down and create more typedefs.
  38.  
  39.  
  40.  
  41.